package com.yuandian.api.management.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yuandian.api.management.validate.InsertFlag;
import com.yuandian.api.management.validate.UpdateFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 服务资源黑名单配置表-实体
 * @author zfsn
 * @date 2023-3-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "服务资源黑名单配置表", description = "服务资源黑名单配置表")
@TableName("conf_resource_blacklist")
public class ConfResourceBlacklist extends BasePage<ConfResourceBlacklist> {

	/**
	 * 主键，唯一标识数据
	 */
	@ApiModelProperty(value = "主键", notes = "主键，唯一标识数据")
	@TableId(type = IdType.AUTO)
	private Integer id;

	/**
	 * 类型，1：MAP_CONTENT_TYPE、2：MAP_BEGIN_URL、3：X_REQUESTED_WITH、4：ACCEPT_TYPE
	 */
	@ApiModelProperty(value = "类型", notes = "类型，1：MAP_CONTENT_TYPE、2：MAP_BEGIN_URL、3：X_REQUESTED_WITH、4：ACCEPT_TYPE")
	private Integer type;

	/**
	 * 键
	 */
	@TableField(value = "`key`")
	@ApiModelProperty(value = "键", notes = "键")
	@NotBlank(message = "键key 不能为空", groups = {InsertFlag.class, UpdateFlag.class})
	private String key;

	/**
	 * 值
	 */
	@TableField(value = "`value`")
	@ApiModelProperty(value = "值", notes = "值")
	@NotBlank(message = "值value 不能为空", groups = {InsertFlag.class, UpdateFlag.class})
	private String value;

	/**
	 * 是否启用，0：否(默认)、1：是
	 */
	@ApiModelProperty(value = "是否启用", notes = "是否启用，0：否(默认)、1：是")
	@NotNull(message = "是否启用isEnable 不能为空", groups = {InsertFlag.class, UpdateFlag.class})
	private Integer isEnable;

	/**
	 * 显示顺序
	 */
	@ApiModelProperty(value = "显示顺序", notes = "显示顺序")
	private Integer sequence;

	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人", notes = "创建人")
	private String createBy;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间", notes = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 更新人
	 */
	@ApiModelProperty(value = "更新人", notes = "更新人")
	private String updateBy;

	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间", notes = "更新时间")
	private LocalDateTime updateTime;

	/**
	 * 是否逻辑删除，0：否、1：是
	 */
	@ApiModelProperty(value = "是否逻辑删除", notes = "是否逻辑删除，0：否、1：是")
	private Integer isDel;

	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注", notes = "备注")
	private String remarks;

}
